package demo5abstract;

/**
 * @Author 12629
 * @Description：
 */
abstract class A {
    public int a;
    public int b;

    public A(int a, int b) {
        this.a = a;
        this.b = b;
    }

    public abstract void test();

    public void func() {
        System.out.println("abstract A::func()");
    }
}
abstract class  B extends A {

    public B(int a,int b) {
        super(a,b);
    }
    public abstract void test2();

}
class C extends B {
    public C(int a,int b) {
        super(a,b);
    }
    @Override
    public void test() {

    }

    @Override
    public void test2() {

    }
}
public class Test {
    public static void main(String[] args) {
        A a = new C(1,2);
        a.func();
    }

    public static void drawMap(Shape shape) {
        shape.draw();
    }
    public static void main1(String[] args) {
        Shape shape = new Rect();
        Shape shape2 = new Cycle();
        drawMap(shape);
        drawMap(shape2);
    }
}
